#include <iostream>

class Complex//复数类
{
public:
    Complex():real(0),vir(0){}
    Complex(int real,int vir):real(real),vir(vir){}
    void show()
    {
        std::cout<<real<<"+"<<vir<<"i"<<std::endl;
    }
    //加法重载
    Complex operator+(const Complex& c)
    {
        Complex result;
        result.real=this->real+c.real;
        result.vir=this->vir+c.vir;
        return result;
    }
    //减法重载
     Complex operator-(const Complex& c)
    {
        Complex result;
        result.real=this->real-c.real;
        result.vir=this->vir-c.vir;
        return result;
    }
    //占位参数（区分前置后置参数）
    //++a
    Complex& operator++()
    {
        this->real++;
        this->vir++;
        return *this;
    }
    //a++
    Complex operator++(int)
    {
        Complex result=*this;
        this->real++;
        this->vir++;
        return result;
    }
    friend std::ostream& operator<<(std::ostream& os,const Complex& c);
    friend std::istream& operator>>(std::istream& is, Complex& c);



private:
    int real;//实部
    int vir;//虚部

};
std::ostream& operator<<(std::ostream& os,const Complex& c)
{
        os<<c.real<<"+"<<c.vir<<"i"<<std::endl;
        return os;
}
std::istream& operator>>(std::istream& is, Complex& c)
{
      is>>c.real>>c.vir;
      return is;
}


int main()
{
  Complex c1(3,4);
  Complex c2(1,2);
  Complex c3=c1++;
  Complex c4=++c2;
  std::cin>>c3;
  std::cout<<c3;
  
  return 0;
  
}